package at.jaki.ubb.crawling.demo.dataTransformer;

import java.util.Collections;
import java.util.List;

import at.jaki.ubb.crawling.api.DataTransformer;
import at.jaki.ubb.crawling.demo.model.StarData;
import at.jaki.ubb.crawling.demo.utils.JSON;
import at.jaki.ubb.crawling.model.DataTransformerResult;
import at.jaki.ubb.crawling.model.RawData;

public class KeplerTransformer implements DataTransformer<String, String, StarData, String> {

	public static final String INPUT_TYPE = "kepler transform";

	public DataTransformerResult<String, String, StarData> transformData(RawData<String> rawData) {

		StarData sd = JSON.getStarData(rawData.getData(), rawData.getId());

		return new DataTransformerResult<String, String, StarData>(null, Collections.singletonList(sd), null);
	}

	public void init() {
	}

	public List<String> getTypes() {
		return Collections.singletonList(INPUT_TYPE);
	}

}
